import React from 'react'
import ReactDOM from 'react-dom';
import DataDisplay from './data_display';
import './index.scss';
import { InitialCard } from './initial_card';

class App extends React.PureComponent<any, any> {
    constructor(props) {
        super(props);
        this.state = {
            initialized: false,
        }
    }
    initializedCallback = () => {
        this.setState({initialized: true})
    }
    render() {
        return <div>
            {!this.state.initialized ? 
                <InitialCard initializedCallback={this.initializedCallback}/>
                :
                <DataDisplay/>
            }

        </div>
    }
}

ReactDOM.render(<App/>, document.getElementById("root"))